Coder Social home page Coder Social logo

art-salad's People

Contributors

felixmariotto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

art-salad's Issues

Bug when model is gripped while exiting a puzzle

So when a puzzle is exited, PuzzleManager is told to clear everything. But if the model is gripped, it is in the controller space, not a child of puzzleManager.group. So controls should have something like that :

events.on( 'exit-puzzle-request', e => {

	controllers.forEach( c => /* remove gripped parts */ )

} );

Part disappear with controller when controller is disabled

For instance if a controller runs out of battery, three.js automatically removes it from the scene.
Since gripped parts are children of the controller, they get removed as well.

Whatever is done against this, it should happen here :

// TODO: handle case when the user was gripping a piece and their controller runs out of battery.
// In this case three.js will automatically remove the controller from the scene, along with its
// children, which is to say the gripped piece.
// It's not ultra important since our controller object still exists, and when the user release the
// grip button, .release() will be called normally. But still this is weird to see the part disappear
// temporarily.
controller.addEventListener( 'disconnected', () => {
//
} );

TODO for release

  • Record a video playing a puzzle for comm.
  • Record a screenshot for site thumbnail and readme.
  • Rework the UI and particularly the homepage, write Art Salad.
  • Refactor the file system, put stuff in subfolders.
  • Setup GH Pages
  • Setup domain name with GH Pages
  • Add 2D Github button
  • Remove the license

Add dark mode

Apparently advised by Oculus Browser accessibility requirements here.

To make the musem model darker, it's enough to add a onBeforeCompile callback here to tinker a bit with the musem material's fragment shader.

Same for the pieces material here, although I think they shouldn't be darkened in the same proportion as the musem model.

Add music and sounds

It would be nice to have sounds in the game, particularly when two puzzle parts get merged, and when a puzzle is finished.
A background ambient music would be nice too, or light crowd noises with lot of echo like in museums.

Here is where parts are merged :

if (
part.position.distanceTo( oppositePart.position ) < 0.07 &&
part.quaternion.angleTo( oppositePart.quaternion ) < 0.5
) {
// in here we do the actual merging of one part into the passed part.
for ( let i = oppositePart.children.length - 1 ; i > -1 ; i -- ) {
const child = oppositePart.children[i];
part.add( child );
}
const isFinished = ( part.children.length === this.pieces.length );
events.emit( 'parts-assembled', isFinished );
}

A event should be fired here with the events module, and this event should be listened in a new audio module.

Add neck rotation on jostick left/right

A rotation of one quarter would be good, since the information is placed one quarter on the right during a puzzle.
Would improve accessibility for heavily disabled people.

It could happen here :

// here we check if the user is pressing the joystick to attract or move away a puzzle part.
if (
controller.grippedPart &&
controller.gamepad.axes &&
Math.abs( controller.gamepad.axes[3] ) > 0.5
) {
const direction = Math.sign( controller.gamepad.axes[3] );
controller.raySpace.attach( controller.grippedPart );
controller.grippedPart.position.z += direction * TELEKINESIS_SPEED * frameSpeed;
controller.attach( controller.grippedPart );
}

I think the camera can't be rotated while updated by the xr session (?), so it would need to be placed a child in a dolly, so the dolly can be rotated instead.

Pivot each piece to face the camera

When pieces are laid out in grid, it would be much better if they were also pivoted so that their front face look at the camera.

Currently half the pieces look away from the camera, that's not ideal :
Screenshot 2022-08-29 204859

It should happen here :

/*
Ideally here is would be nice to add a function to pivot the part so it doesn't look "away"
from the center of the scene.
Idea: computing the normal of 10 random triangle in the mesh, computing the average, and pivot
the part so this averaged normal look the camera.
*/

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.