Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 19 2020 05:41
    dmvaldman closed #76
  • May 27 2020 05:36

    dmvaldman on master

    Update README.md (compare)

  • Jul 27 2019 15:56

    dmvaldman on master

    Fix spaces (compare)

  • Jul 27 2019 15:28

    dmvaldman on master

    Upgrade eslint version due to s… (compare)

  • Dec 16 2017 02:03
    skaraman commented #76
  • Dec 16 2017 01:49
    skaraman commented #76
  • Dec 16 2017 01:48
    skaraman commented #76
  • Dec 16 2017 01:37
    skaraman commented #76
  • Dec 16 2017 01:35
    skaraman commented #76
  • Dec 16 2017 00:34
    skaraman edited #76
  • Dec 16 2017 00:28
    skaraman opened #76
  • Oct 01 2017 12:10
    culyun commented #74
  • Oct 01 2017 12:08
    culyun commented #74
  • Oct 01 2017 04:41

    dmvaldman on noqueue

    Fix typo End event happens on different … Locking seems to be working and 2 more (compare)

  • Sep 30 2017 17:03
    trusktr commented #74
  • Sep 30 2017 07:57
    culyun commented #74
  • Sep 30 2017 00:40
    dmvaldman closed #75
  • Sep 08 2017 05:22
    dmvaldman commented #75
  • Sep 07 2017 22:36
    newswim opened #75
  • Sep 02 2017 16:21
    dmvaldman commented #74
Fredy Mendez
@frh3ddy
hello. I have another question. when I set the property margins to a node or surface. it only apply it to one side and also doubles the margin number. example. if i set margins to be [10, 10], then the node is gonna have a right margin of 20 and bottom margin of 20, so my question is, is this suppose to happen and I'm just not understanding , is a bug or how do i make it behave like css margin?
David Valdman
@dmvaldman
I admit this is confusing. I'm not sure how to make it better but open to ideas! The way it's "supposed" to be used, is to use margin along with an origin value
so if you wanted even margins all around a Surface with a width of 10px, you'd have a margin of [10,10] and an origin of [.5,.5]
if origin was [0,.5] then the surface would be flush on the left side, have 20px of extra space on the right, and be vertically centered (10px above and below)
since origin defaults to [0,0] you're getting twice the margins on the right and bottom
David Valdman
@dmvaldman
as far as API goes, the tricky part is that I'd like setting a margin to cause no translation. Typically a margin of [10,10,10,10] would imply reducing the width and height of a rectangle by 20px and translate it down and to the right by 10px. Unfortunately the way the code works is that "moving" and "reducing the size of" are two different code paths internally
Fredy Mendez
@frh3ddy
thanks, I understand now
Rockerz
@flexiboyz_twitter
Hi, first thank for this really promising framework, I came after the tweet about "mouseInput subscribe to surface".
Rockerz
@flexiboyz_twitter
It' seems to be 'this' is not the surface in the callback function, but the MouseInput itself. Trying to call this.setProperties({background:'blue'}); will raise an error
http://codepen.io/rockerz/pen/pEXaJW?editors=0010#0
David Valdman
@dmvaldman
ah sorry i misunderstood your question. if you listen directly on the surface, like mySurface.on('click', function(event){...}) then this will be the surface
the data passed in MouseInput doesn't have a reference to the surface you're right
it could though!
i'll look into adding it. for now you can also create a unique MouseInput for each surface, and track them manually
Rockerz
@flexiboyz_twitter
thank for the precision , it was me second option :smile:.
Is the framework is able to display mesh object trough a webGl renderer ? Or a way to implement threejs renderer inside surface and interact with camera ?
David Valdman
@dmvaldman
there's no WebGL support built into Samsara. All you can do is create a Surface that is a <canvas> tag and create a webGL experience there yourself, using threeJS or whatever
Samsara can still control the layout of that surface in your app, but it doesn't give any WebGL primitives to use within the surface
Rockerz
@flexiboyz_twitter
Ok understood , "Just box, content is up to you" :package:
David Valdman
@dmvaldman
:-)
Rockerz
@flexiboyz_twitter
I'm just curious about Samsara dev status, i dig in it from 2 day's and OMG it's really cool, i just want to use it in prod
I was AS3/Flex dev in previous life, with Samsara i'm feel like home
David Valdman
@dmvaldman
it's pretty stable at the moment. the API hasn't changed much in the last 6 months. at some point I'm going to move away from requireJS and use es6 import/export. that's going to be backwards incompatible, but mostly the changes you'd need to do are superficial
there may be some other renaming of things, but otherwise the API will stay close to what it is now
Rockerz
@flexiboyz_twitter
Cool, ES6 will be really great.
A little more doc also be great :smirk: . I was struggling with some size measurement (view was returning null), but after remember "Everything is stream", if found that the .size of a view dispatch is own end even so the size is available after event.
David Valdman
@dmvaldman
ah. yeah there's also a current bug where size may be undefined if used in a Stream.liftwith other things, and then only be defined a little later. That may be what you're referring to
that will get fixed, but if there are other stumbling blocks, please let me know!
Rockerz
@flexiboyz_twitter
Hi, i came this time for a very simple question: Why constant are not exposed in the API ?
David Valdman
@dmvaldman
What constant?
Rockerz
@flexiboyz_twitter
Sorry i'm feel stupid, constant like ScrollView.DIRECTION.X.... but i've seen that available
how dumb am'i
David Valdman
@dmvaldman
oh not dumb at all. in fact I find that kind of API pretty confusing. in the future directions will just be strings x and y for instance
but yeah all those things named CONSTANTS are usually attached the the constructor. that magic happens in the View base class
Richard Kopelow
@richardkopelow
@dmvaldman I embedded a youtube video in a surface, the surface is in a container surface, that container surface is in a scroll view. when the mouse is over the youtube video, the scrollview doesn't scroll. any ideas?
David Valdman
@dmvaldman
do all of those things need to happen for you to not be able to scroll?
if you could isolate the issue that would help, or provide an example
Erik Kaplun
@erikkaplun

/.../ let's assume a parent size of [w, h] and a node size of [w', h'] /.../
An origin value of [x,y] will produce a translation of [-w * x', -h * y'] /.../

but shouldn't it say "will produce a translation of [-w' * x, -h' * x]"?

David Valdman
@dmvaldman
@eallik that's correct, my mistake!
will update the docs to reflect that soon
Erik Kaplun
@erikkaplun
there was some other error of similar nature, but I forgot where it was...
David Valdman
@dmvaldman
ha, quite possible!
if you find it again, let me know
Erik Kaplun
@erikkaplun

http://samsarajs.org/reference_docs/classes/Streams.Stream.html

— in the example, where do positionStream and sizeStream come from? position and size by any chance?

David Valdman
@dmvaldman
hmm, yes. also that example is very out of date
David Valdman
@dmvaldman
oh maybe it will, actually. things have just evolved a lot in this branch i'm working on :-)
nope, it won't. at least not in v2.3+
streams no longer listen to the resize event
only start, update and end
David Valdman
@dmvaldman
I got an email @eallik that you asked "is it a good idea to work on that branch instead?" but it doesn't appear here. Maybe you deleted it after asking? Or Gitter is buggy
Erik Kaplun
@erikkaplun
yeah, I deleted it because I thought it wasn't that important, but didn't realize you'd get an e-mail :)