hiloteam / hilo3d Goto Github PK
View Code? Open in Web Editor NEW🎮 A 3D WebGL Rendering Engine
Home Page: https://hiloteam.github.io/Hilo3d/docs/index.html
License: MIT License
🎮 A 3D WebGL Rendering Engine
Home Page: https://hiloteam.github.io/Hilo3d/docs/index.html
License: MIT License
In Shader.js
:
import basicFragCode from './basic.frag';
import basicVertCode from './basic.vert';
import geometryFragCode from './geometry.frag';
import pbrFragCode from './pbr.frag';
These dependent shaders should be placed in mateiral.
可以缩放相机适配模型大小吗?
库现在的大包结果是全局处理方式。或者兼容全局模式方式
Spent couple hours trying to get correct normals.
All was about data management:
//Works like that
points[0].position.copy(data.vertices.get(0));
points[1].position.copy(data.vertices.get(1));
points[2].position.copy(data.vertices.get(2));
//Doesn't work like that
const p0 = data.vertices.get(0);
const p1 = data.vertices.get(1);
const p2 = data.vertices.get(2);
//p0 === p1 === p2
points[0].position.copy(p0);
points[1].position.copy(p1);
points[2].position.copy(p2);
All because get
returns reference to same vector object. Please, add warning about that in docs, and, optionally, additional method getCopy
which should return vector copy
是否可以支持淘宝小程序?
Hi.
I experienced few problems when tried to use cannon by example and think it (example) should be extended:
world.gravity.set(0, GRAVITY, 0); //Hilo's gravity direction
const groundBody = new cannon.Body({
mass: 0, // mass == 0 makes the body static
quaternion: new cannon.Quaternion(0, 0, 0).setFromEuler(-Math.PI / 2, 0, 0) //hilo's ground rotation
});
Also i think it would be better to let cannon work in Z direction as it was, but then we need to swap axes like hilomesh.setPosition(this.body.position.x, this.body.position.z, this.body.position.y);
and rotation too.
2. Line geometry = new Hilo3d.BoxGeometry( 2, 2, 2 );
incorrect because BoxGeometry works with object argument, const geometry = new Hilo3d.BoxGeometry({ width: 2, height: 2, depth: 2 });
3. It doesn't clear from example that Hilo's bodies (Boxes) has to be twice bigger than cannon's
const geometry = new Hilo3d.BoxGeometry({ width: 2, height: 2, depth: 2 });
const shape = new cannon.Box(new cannon.Vec3(1, 1, 1)); //does it because cannon sets distance *from center*?
I don't sure is it problem exist only for boxes or whole cannon-hilo bind.
Thanks for your time!
Because WebGL resources cannot be shared in different contexts, some global classes need to be modified.
I tried Khronos' new test model TextureEncodingTest.gltf with Hilo3d.
However, it seems to be different from the expected result.
Test model:
https://github.com/KhronosGroup/glTF-Sample-Models/tree/encoding/2.0/TextureEncodingTest
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.