Skip to content

Commit

Permalink
update to 0.7.1-dev.3
Browse files Browse the repository at this point in the history
fix performance issue caused by build target
  • Loading branch information
lslzl3000 committed Nov 18, 2023
1 parent 4018f1c commit 883828f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/public/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script type="importmap">
{
"imports": {
"@orillusion/core": "https://unpkg.com/@orillusion/[email protected]/dist/orillusion.es.js",
"@orillusion/core": "https://unpkg.com/@orillusion/[email protected]-dev.3/dist/orillusion.es.js",
"@orillusion/physics": "https://unpkg.com/@orillusion/[email protected]/dist/physics.es.js",
"@orillusion/particle": "https://unpkg.com/@orillusion/[email protected]/dist/particle.es.js",
"@orillusion/stats": "https://unpkg.com/@orillusion/[email protected]/dist/stats.es.js",
Expand Down
8 changes: 1 addition & 7 deletions docs/public/examples/benchmark/DrawCallInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class DrawCallInstance {
}

private _list: Object3D[] = []
private _rotList: number[] = []

initScene() {
let shareGeometry = new BoxGeometry()
Expand All @@ -86,12 +85,9 @@ class DrawCallInstance {
obj.transform.scaleX = Math.random() * 2 + 1.2
obj.transform.scaleY = Math.random() * 2 + 1.2
obj.transform.scaleZ = Math.random() * 2 + 1.2

obj.transform.rotationX = Math.random() * 360
obj.transform.rotationY = Math.random() * 360
obj.transform.rotationZ = Math.random() * 360

this._rotList.push((Math.random() * 1 - 1 * 0.5) * 2.0 * Math.random() * 100)
obj.transform.localDetailRot = new Vector3((Math.random() * 1 - 1 * 0.5) * 2.0 * Math.random() * 50 * 0.001, (Math.random() * 1 - 1 * 0.5) * 2.0 * Math.random() * 50 * 0.001, (Math.random() * 1 - 1 * 0.5) * 2.0 * Math.random() * 50 * 0.001)

if (i % 10000 == 0) {
Expand All @@ -109,10 +105,8 @@ class DrawCallInstance {

renderLoop() {
if (this.anim) {
let i = 0
for (i = 0; i < this._list.length; i++) {
for (let i = 0; i < this._list.length; i++) {
let element = this._list[i]
// element.transform.rotationY += 1;
element.transform.localChange = true
}
}
Expand Down
1 change: 1 addition & 0 deletions docs/public/examples/physics/PhysicsCar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class Sample_PhysicsCar {
f.add({'Reset': () => {
location.reload()
}}, 'Reset')
f.add({"Use WASD": "control car to hit box"}, 'Use WASD')
f.open()
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/node": "^18.18.8",
"esbuild": "^0.17.19",
"prettier": "^2.8.8",
"vitepress": "1.0.0-rc.26",
"vitepress": "1.0.0-rc.27",
"vue": "^3.3.7"
},
"pnpm": {
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 883828f

Please sign in to comment.