Code Monkey home page Code Monkey logo

Comments (11)

mrdoob avatar mrdoob commented on May 5, 2024

I don't think this needs to be in three.js. I was working on a special camera with yaw(), pitch() and roll(), but that would increase the filesize of the library considerably so it would be better as a external class (AdvancedCamera) that extends Camera to be used in specific cases.

The aim of the library is to have have the minimum methods as possible and to keep the filesize down.

from three.js.

SignpostMarv avatar SignpostMarv commented on May 5, 2024

If the aim of the library is to keep the filesize down, but having "advanced" classes that extend basic functionality is an option, perhaps it might do to create a plugins directory ?

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Yeah I haven't figured out a smart way to handle this yet...

from three.js.

SignpostMarv avatar SignpostMarv commented on May 5, 2024

THREE.plugin_root = 'http://github.com/mrdoob/three.js/raw/master/plugins/';

THREE.plugin('AdvancedCamera.js', onloadCallback);

perhaps ?

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

that sounds weird... why not just this letting everyone create their own custom clases and save them on their own projects like this:

/index.html
/js/three.js
/js/three/cameras/AdvancedCamera.js
/js/...

?

from three.js.

SignpostMarv avatar SignpostMarv commented on May 5, 2024

"First Party Plugins".

"Reinventing the wheel".

Because as you've demonstrated with your desire to have an advanced camera, and http://mrdoob.com/projects/three.js/examples/primitives/Plane.js , some classes would be beneficial to be distributed alongside three.js

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

I guess we see this differently. The reason Plane is outside the package is because you don't always need a Plane in your project. That's why I moved them out and placed them in the examples folder.

Having said that, I need to figure out what to do with the renderers. Right now there are 2 renderers inside three.js, maybe I should split it and create three_canvas.js, three_svg.js (and three_webgl.js) at some point...

from three.js.

SignpostMarv avatar SignpostMarv commented on May 5, 2024

Would that be with the core built into those three files, or the core in it's own file ?

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

/core would be included in each file. It's just to do not have to include the SVGRenderer if your project only uses CanvasRenderer

from three.js.

SignpostMarv avatar SignpostMarv commented on May 5, 2024

Agreed. However, I wonder how many both renderers in different aspects of the same project- or perhaps using the CanvasRenderer as a fallback when the browser doesn't support WebGL?

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Yeah, I guess three.js will always be available and would suit that case. Otherwise, anyone can do their own pack of files (python file is easy to hack).

from three.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.